<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<div class="container-fluid">
	<div class="row-fluid">
		<div class="span2"></div>
		<div class="span8">
		<!-- order details starts here-->
			<div class="row-fluid">
			<h4>Order Details</h4>
			<table class="table">
						<caption></caption>
						<thead>
							<tr>
							<th>Order Date</th>
							<th>Name</th>
							<th>Email</th>
							<th>Phone</th>
							<th>Address</th>
								<th>Order ID</th>
								<th>Quantity</th>
								<th>Amount (Rs.)</th>
								<th>Status</th>
							</tr>
						</thead>
						<tbody>
							<s:iterator value="osp">
								<tr>
								<td><s:property value="%{orderdatetime}" /></td>
								<td><s:property value="%{name}" /></td>
								<td><s:property value="%{useremail}" /></td>
								<td><s:property value="%{phone}" /></td>
								<td><s:property value="%{address}" /></td>
									<td>
									<s:form theme = "simple" action="orderdetails" method="post" validate="true">
									<s:hidden name="orderid" value="%{orderid}"></s:hidden>
									<s:submit name="orderdetails" theme = "simple" cssClass="btn" value="%{orderid}"></s:submit>
									
									</s:form>
									</td>
									<td><s:property value="%{quantity}" /></td>
									<td><s:property value="%{amount}" /></td>
									<td>
	  <s:if test='%{status == "0"}'><span class="label label-success">Confirmed</span></s:if>
	  <s:elseif test='%{status == "1"}'><span class="label label-important">Canceled</span></s:elseif>
	  <s:elseif test='%{status == "2"}'><span class="label label-warning">Payment Pending</span></s:elseif>
	  </td>
	  <!-- <td>
	  <s:if test='%{status == "0"}'>
	  <s:form cssClass="form-horizontal" action="cancelorder" method="post" validate="true">
	  <s:hidden name="orderid" value="%{orderid}"></s:hidden>
	  <s:submit name="cancelorder" theme = "simple" cssClass="btn btn-small btn-warning" value="Cancel"></s:submit>
	  </s:form>
	  </s:if> 
	  </td>-->
								</tr>
							</s:iterator>
						</tbody>
					</table>
			</div>
			<hr />
		<!-- order details ends here-->
		
		
		</div>
		<div class="span2"></div>
	</div>
</div>
